package cn.juque.systemservice.service;

import cn.juque.common.base.PageInfo;
import cn.juque.systemservice.bo.employee.EmployeeInfoAddBO;
import cn.juque.systemservice.bo.employee.EmployeeInfoDetailBO;
import cn.juque.systemservice.bo.employee.EmployeeInfoUpdateBO;
import cn.juque.systemservice.bo.employee.EmployeePasswordBO;
import cn.juque.systemservice.entity.EmployeeInfo;

import java.util.List;

/**
 * @author JUQUE
 * @version 1.0.0
 * <ul>
 *  <li>simple-generator</li>
 *  <li>员工信息</li>
 * </ul>
 * @date 2022-11-03 11:58:48
 **/
public interface IEmployeeInfoService {

    /**
     * 查询
     *
     * @param employeeInfo employeeInfo
     * @return List<EmployeeInfo>
     */
    List<EmployeeInfo> listInfoWithoutPage(EmployeeInfo employeeInfo);

    /**
     * 分页查询
     *
     * @param pageInfo     pageInfo
     * @param employeeInfo employeeInfo
     * @return DataGrid<EmployeeInfo>
     */
    List<EmployeeInfo> listInfoWithPage(PageInfo pageInfo, EmployeeInfo employeeInfo);

    /**
     * 详情
     *
     * @param id 主键
     * @return EmployeeInfo
     */
    EmployeeInfoDetailBO detail(String id);

    /**
     * 根据员工号获取员工信息
     *
     * @param userIdList 员工号
     * @return list
     */
    List<EmployeeInfoDetailBO> getByUserId(List<String> userIdList);

    /**
     * 根据角色获取员工信息
     *
     * @param roleIdList 员工号
     * @return list
     */
    List<EmployeeInfoDetailBO> getByRoleId(List<String> roleIdList);

    /**
     * 获取密码
     *
     * @param employeePasswordBO EmployeePasswordBO
     * @return String
     */
    EmployeeInfo getPassword(EmployeePasswordBO employeePasswordBO);

    /**
     * 保存
     *
     * @param employeeInfoAddBO employeeInfoAddBO
     */
    void saveInfo(EmployeeInfoAddBO employeeInfoAddBO);

    /**
     * 更新
     *
     * @param employeeInfoUpdateBO employeeInfoUpdateBO
     */
    void updateInfo(EmployeeInfoUpdateBO employeeInfoUpdateBO);


    /**
     * 更新密码
     *
     * @param employeeId  员工ID
     * @param password    原密码
     * @param newPass     新密码
     * @param confirmPass 确认密码
     */
    void updatePassword(String employeeId, String password, String newPass, String confirmPass);

    /**
     * 删除
     *
     * @param ids 主键列表
     */
    void deleteInfo(List<String> ids);
}
